function Longeststr(arr) {
    let map = new Map()
    let j = 0;
    let max = 0;
    for (let i = 0; i < arr.length; i++) {
        if (map.has(arr[i])) {
            j = Math.max(map[arr[i]] + 1, j)
        }
        max = Math.max(max, i - j + 1)
        map.set(s[i], i)
    }
}